{%load static%}
<!DOCTYPE html>
<html lang="zh">
  <head>
    <meta charset="UTF-8" />
    <title>amis demo</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta
      name="viewport"
      content="width=device-width, initial-scale=1, maximum-scale=1"
    />
    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
    <link rel="stylesheet" href="{%static 'amis/sdk.css'%}" />
    <link rel="stylesheet" href="{%static 'amis/helper.css'%}" />
    <link rel="stylesheet" href="{%static 'amis/iconfont.css'%}" />
    <style>
      html,
      body,
      .app-wrapper {
        position: relative;
        width: 100%;
        height: 100%;
        margin: 0;
        padding: 0;
      }
    </style>
  </head>
  <body>
    <div id="root" class="app-wrapper"></div>
    <script src="{%static 'amis/sdk.js'%}"></script>
    <script type="text/javascript">
      (function () {
        let amis = amisRequire('amis/embed');
        let amisJSON =
        {
  "type": "page",
  "title": "智能慢性病监测系统",
  "body": [
    {
      "type": "flex",
      "className": "p-1",
      "items": [
        {
          "type": "container",
          "body": [
            {
              "type": "tpl",
              "tpl": "医疗助手",
              "inline": true,
              "wrapperComponent": "",
              "id": "u:4075fbf7db76",
              "themeCss": {
                "baseControlClassName": {
                  "font:default": {
                    "fontWeight": "var(--fonts-weight-3)",
                    "fontSize": "var(--fonts-size-1)"
                  }
                }
              }
            }
          ],
          "size": "xs",
          "style": {
            "position": "static",
            "display": "block",
            "flex": "1 1 auto",
            "flexGrow": 1,
            "flexBasis": "auto"
          },
          "wrapperBody": false,
          "isFixedHeight": false,
          "isFixedWidth": false,
          "id": "u:1932f4c7a31f"
        },
        {
          "type": "container",
          "body": [
            {
              "type": "tpl",
              "tpl": "向多个大语言模型提出各类医学领域问题",
              "inline": true,
              "wrapperComponent": "h3",
              "id": "u:6197e435f625"
            }
          ],
          "size": "xs",
          "style": {
            "position": "static",
            "display": "block",
            "flex": "1 1 auto",
            "flexGrow": 1,
            "flexBasis": "auto"
          },
          "wrapperBody": false,
          "isFixedHeight": false,
          "isFixedWidth": false,
          "id": "u:9f11844a9942"
        }
      ],
      "style": {
        "position": "relative",
        "flexDirection": "column",
        "inset": "auto",
        "flexWrap": "nowrap",
        "alignItems": "center"
      },
      "id": "u:985911dcec8d",
      "isFixedHeight": false,
      "isFixedWidth": false
    },
    {
      "type": "flex",
      "className": "p-1",
      "items": [
        {
          "type": "container",
          "body": [
            {
              "id": "u:a42de98c6405",
              "type": "form",
              "title": "",
              "mode": "normal",
              "dsType": "api",
              "feat": "Insert",
              "body": [
                {
                  "name": "text",
                  "label": "",
                  "type": "input-text",
                  "id": "u:546c3af45155",
                  "required": true,
                  "validateOnChange": false,
                  "value": "",
                  "placeholder": "{{ q.text }}"
                }
              ],
              "api": {
                "url": "/api/create_question",
                "method": "post",
                "requestAdaptor": "",
                "adaptor": "",
                "messages": {},
                "dataType": "json"
              },
              "actions": [
                {
                  "type": "button",
                  "label": "重置",
                  "onEvent": {
                    "click": {
                      "actions": [
                        {
                          "actionType": "reset",
                          "componentId": "u:a42de98c6405"
                        }
                      ]
                    }
                  },
                  "level": "default",
                  "id": "u:6644e8e0b16a"
                },
                {
                  "type": "button",
                  "label": "发送",
                  "onEvent": {
                    "click": {
                      "actions": [
                        {
                          "actionType": "validate",
                          "ignoreError": false,
                          "componentId": "u:a42de98c6405",
                          "outputVar": "validateResult"
                        },
                        {
                          "actionType": "submit",
                          "componentId": "u:a42de98c6405",
                          "outputVar": "submitResult",
                          "expression": "${event.data.validateResult}",
                          "ignoreError": false
                        },
                        {
                          "ignoreError": false,
                          "actionType": "toast",
                          "args": {
                            "msgType": "info",
                            "position": "top-right",
                            "closeButton": true,
                            "showIcon": true,
                            "msg": "提交成功，即将跳转（${event.data.submitResult.responseData.id}）",
                            "className": "theme-toast-action-scope"
                          },
                          "expression": "${event.data.validateResult}"
                        },
                        {
                          "ignoreError": false,
                          "actionType": "url",
                          "args": {
                            "url": "/chat/detail/${event.data.submitResult.responseData.id}",
                            "blank": false
                          },
                          "expression": "${event.data.submitResult.responseData.id}"
                        }
                      ]
                    }
                  },
                  "level": "primary",
                  "id": "u:337d5c7d12ab"
                }
              ],
              "resetAfterSubmit": false,
              "className": ""
            }
          ],
          "size": "xs",
          "style": {
            "position": "static",
            "display": "block",
            "flex": "1 1 auto",
            "flexGrow": 1,
            "minWidth": "500px"
          },
          "wrapperBody": false,
          "isFixedHeight": false,
          "isFixedWidth": false,
          "id": "u:74665dd2bf96"
        },
        {
          "type": "container",
          "body": [
            {
              "type": "grid",
              "columns": [
                {
                  "body": [
                    {
                      "type": "container",
                      "body": [
                        {
                          "type": "tpl",
                          "tpl": "文心一言",
                          "inline": true,
                          "wrapperComponent": "h2",
                          "id": "u:1498db870463",
                          "themeCss": {
                            "baseControlClassName": {
                              "border:default": {
                                "top-border-style": "var(--borders-style-1)",
                                "left-border-style": "var(--borders-style-1)",
                                "right-border-style": "var(--borders-style-1)",
                                "bottom-border-style": "var(--borders-style-1)"
                              },
                              "font:default": {
                                "fontWeight": "var(--fonts-weight-3)"
                              }
                            }
                          }
                        },
                        {
                          "type": "input-rating",
                          "label": "评分",
                          "name": "rating",
                          "id": "u:325b5c806f38",
                          "allowClear": false,
                          "half": false,
                          "colors": {
                            "2": "#abadb1",
                            "3": "#787b81",
                            "5": "#ffa900"
                          }
                        },
                        {
                          "type": "markdown",
                          "value": "拉肚子，也称为腹泻，是一种常见的消化问题。以下是一些处理拉肚子的建议：\r\n\r\n1. **补充水分和电解质**：腹泻可能导致脱水和电解质失衡，因此及时补充水分和电解质至关重要。可以选择口服补液盐，它们有助于补充因腹泻而失去的水分和电解质。\r\n2. **饮食调整**：在拉肚子期间，应避免油腻、辛辣、生冷和刺激性食物，选择清淡、易消化的食物，如稀饭、面条等。同时，可以适当增加富含益生菌的食物，如酸奶，以帮助恢复肠道菌群平衡。\r\n3. **药物治疗**：如果腹泻严重，可以在医生建议下使用止泻药。此外，如果腹泻是由细菌感染引起的，医生可能会开具抗生素进行治疗。在使用任何药物前，请务必咨询医生并遵循医嘱。\r\n4. **休息**：在拉肚子期间，身体需要更多的休息来恢复。避免过度劳累，保证充足的睡眠，有助于缓解腹泻症状。\r\n\r\n如果腹泻症状持续不减或者加重，建议及时就医，以便医生根据具体情况进行诊断和治疗。同时，预防拉肚子也非常重要，可以通过注意个人卫生、饮食卫生、避免与腹泻患者接触等方式来降低拉肚子的风险。",
                          "id": "u:a1a8a90e3331"
                        }
                      ],
                      "style": {
                        "position": "static",
                        "display": "block"
                      },
                      "size": "none",
                      "wrapperBody": false,
                      "id": "u:10abcbe93764",
                      "isFixedHeight": false,
                      "isFixedWidth": false,
                      "themeCss": {
                        "baseControlClassName": {
                          "border:default": {
                            "top-border-style": "var(--borders-style-2)",
                            "left-border-style": "var(--borders-style-2)",
                            "right-border-style": "var(--borders-style-2)",
                            "bottom-border-style": "var(--borders-style-2)",
                            "top-border-width": "var(--borders-width-2)",
                            "left-border-width": "var(--borders-width-2)",
                            "right-border-width": "var(--borders-width-2)",
                            "bottom-border-width": "var(--borders-width-2)",
                            "top-border-color": "var(--colors-neutral-line-8)",
                            "left-border-color": "var(--colors-neutral-line-8)",
                            "right-border-color": "var(--colors-neutral-line-8)",
                            "bottom-border-color": "var(--colors-neutral-line-8)"
                          },
                          "radius:default": {
                            "top-left-border-radius": "var(--borders-radius-4)",
                            "top-right-border-radius": "var(--borders-radius-4)",
                            "bottom-left-border-radius": "var(--borders-radius-4)",
                            "bottom-right-border-radius": "var(--borders-radius-4)"
                          },
                          "padding-and-margin:default": {
                            "paddingLeft": "var(--sizes-size-7)",
                            "paddingRight": "var(--sizes-size-7)"
                          }
                        }
                      }
                    }
                  ],
                  "id": "u:b88ea907ce38",
                  "themeCss": {
                    "baseControlClassName": {
                      "border:default": {
                        "top-border-style": "var(--borders-style-1)",
                        "left-border-style": "var(--borders-style-1)",
                        "right-border-style": "var(--borders-style-1)",
                        "bottom-border-style": "var(--borders-style-1)"
                      }
                    }
                  }
                },
                {
                  "id": "u:0ad0557928e6",
                  "body": [
                    {
                      "type": "container",
                      "body": [
                        {
                          "type": "tpl",
                          "tpl": "科大讯飞",
                          "inline": true,
                          "wrapperComponent": "h2",
                          "id": "u:41a1079f20c6",
                          "themeCss": {
                            "baseControlClassName": {
                              "border:default": {
                                "top-border-style": "var(--borders-style-1)",
                                "left-border-style": "var(--borders-style-1)",
                                "right-border-style": "var(--borders-style-1)",
                                "bottom-border-style": "var(--borders-style-1)"
                              },
                              "font:default": {
                                "fontWeight": "var(--fonts-weight-3)"
                              }
                            }
                          }
                        },
                        {
                          "type": "input-rating",
                          "label": "评分",
                          "name": "rating",
                          "id": "u:11a6a26d4722"
                        },
                        {
                          "type": "markdown",
                          "value": "拉肚子是指肠道蠕动加快，食物在肠道内通过速度加快，导致粪便变得稀薄、水样，且排便次数增多的症状。以下是一些应对拉肚子的方法：\r\n\r\n1.  补充水分：拉肚子会导致身体失水，因此需要多喝水或其他饮料，如果汁、鸡汤等，以补充身体所需的水分。\r\n\r\n2.  避免食用刺激性食物：如辛辣、油腻、生冷等食物，这些食物会刺激肠道，加重拉肚子的症状。\r\n\r\n3.  食用易消化的食物：如米粥、面条、馒头等，这些食物易于消化，不会给肠道带来过大的负担。\r\n\r\n4.  注意卫生：拉肚子可能是由细菌、病毒等引起的感染所致，因此要注意个人卫生，勤洗手，避免接触污染物。\r\n\r\n5.  适当服用药物：如果拉肚子症状严重，可以在医生的指导下适当服用止泻药或抗生素等药物。\r\n\r\n需要注意的是，如果拉肚子持续时间较长或伴随其他症状，如发热、腹痛等，应及时就医。",
                          "id": "u:c70f98eed51e"
                        }
                      ],
                      "style": {
                        "position": "static",
                        "display": "block"
                      },
                      "size": "none",
                      "wrapperBody": false,
                      "id": "u:436941eaf798",
                      "isFixedHeight": false,
                      "isFixedWidth": false,
                      "themeCss": {
                        "baseControlClassName": {
                          "border:default": {
                            "top-border-style": "var(--borders-style-2)",
                            "left-border-style": "var(--borders-style-2)",
                            "right-border-style": "var(--borders-style-2)",
                            "bottom-border-style": "var(--borders-style-2)",
                            "top-border-width": "var(--borders-width-2)",
                            "left-border-width": "var(--borders-width-2)",
                            "right-border-width": "var(--borders-width-2)",
                            "bottom-border-width": "var(--borders-width-2)",
                            "top-border-color": "var(--colors-neutral-line-8)",
                            "left-border-color": "var(--colors-neutral-line-8)",
                            "right-border-color": "var(--colors-neutral-line-8)",
                            "bottom-border-color": "var(--colors-neutral-line-8)"
                          },
                          "radius:default": {
                            "top-left-border-radius": "var(--borders-radius-4)",
                            "top-right-border-radius": "var(--borders-radius-4)",
                            "bottom-left-border-radius": "var(--borders-radius-4)",
                            "bottom-right-border-radius": "var(--borders-radius-4)"
                          },
                          "padding-and-margin:default": {
                            "paddingLeft": "var(--sizes-size-7)",
                            "paddingRight": "var(--sizes-size-7)"
                          }
                        }
                      }
                    }
                  ]
                },
                {
                  "body": [
                    {
                      "type": "container",
                      "body": [
                        {
                          "type": "tpl",
                          "tpl": "GPT4",
                          "inline": true,
                          "wrapperComponent": "h2",
                          "id": "u:7c97303d6574",
                          "themeCss": {
                            "baseControlClassName": {
                              "border:default": {
                                "top-border-style": "var(--borders-style-1)",
                                "left-border-style": "var(--borders-style-1)",
                                "right-border-style": "var(--borders-style-1)",
                                "bottom-border-style": "var(--borders-style-1)"
                              },
                              "font:default": {
                                "fontWeight": "var(--fonts-weight-3)"
                              }
                            }
                          }
                        },
                        {
                          "type": "input-rating",
                          "label": "评分",
                          "name": "rating",
                          "id": "u:535d77bf8fd3"
                        },
                        {
                          "type": "markdown",
                          "value": "对不起听到你不舒服。这是一些可以帮助你的建议：\r\n\r\n1. 喝大量不含咖啡因和不含酒精的液体，如水、椰子水或者草药茶。这可以帮助防止脱水。\r\n\r\n2. 吃稀饭、香蕉、烤面包、苹果酱和熬煮过的土豆这样的淡食。这些食物可以帮助减缓拉肚子。\r\n\r\n3. 避免吃油腻、高脂肪或者过于重口味的食物。\r\n\r\n4. 暂时停止食用可能会刺激你的胃的东西，像是奶制品、辛辣食品和含咖啡因的饮料。\r\n\r\n如果感到不适持续不减或者加重，最好搜索当地的医疗建议。无论何时，如果你感觉严重脱水、有血块或者黑色的大便，请立即寻求医生的帮助。",
                          "id": "u:41f348f5471b"
                        }
                      ],
                      "style": {
                        "position": "static",
                        "display": "block"
                      },
                      "size": "none",
                      "wrapperBody": false,
                      "id": "u:304c70199319",
                      "isFixedHeight": false,
                      "isFixedWidth": false,
                      "themeCss": {
                        "baseControlClassName": {
                          "border:default": {
                            "top-border-style": "var(--borders-style-2)",
                            "left-border-style": "var(--borders-style-2)",
                            "right-border-style": "var(--borders-style-2)",
                            "bottom-border-style": "var(--borders-style-2)",
                            "top-border-width": "var(--borders-width-2)",
                            "left-border-width": "var(--borders-width-2)",
                            "right-border-width": "var(--borders-width-2)",
                            "bottom-border-width": "var(--borders-width-2)",
                            "top-border-color": "var(--colors-neutral-line-8)",
                            "left-border-color": "var(--colors-neutral-line-8)",
                            "right-border-color": "var(--colors-neutral-line-8)",
                            "bottom-border-color": "var(--colors-neutral-line-8)"
                          },
                          "radius:default": {
                            "top-left-border-radius": "var(--borders-radius-4)",
                            "top-right-border-radius": "var(--borders-radius-4)",
                            "bottom-left-border-radius": "var(--borders-radius-4)",
                            "bottom-right-border-radius": "var(--borders-radius-4)"
                          },
                          "padding-and-margin:default": {
                            "paddingLeft": "var(--sizes-size-7)",
                            "paddingRight": "var(--sizes-size-7)"
                          }
                        }
                      }
                    }
                  ],
                  "id": "u:a6083cc00ca3"
                }
              ],
              "id": "u:6f7792f45592",
              "valign": "top",
              "align": "left"
            }
          ],
          "size": "xs",
          "style": {
            "position": "static",
            "display": "block",
            "flex": "1 1 auto",
            "flexGrow": 1,
            "minWidth": "1000px"
          },
          "wrapperBody": false,
          "isFixedHeight": false,
          "isFixedWidth": false,
          "id": "u:219aad823e2d"
        }
      ],
      "style": {
        "position": "relative",
        "inset": "auto",
        "flexWrap": "nowrap",
        "flexDirection": "column",
        "justifyContent": "space-around",
        "alignItems": "center"
      },
      "id": "u:bd4cee47aa42",
      "isFixedHeight": false,
      "isFixedWidth": false
    }
  ],
  "id": "u:894a36c5eea4",
  "aside": [],
  "asideResizor": true,
  "pullRefresh": {
    "disabled": true
  },
  "themeCss": {
    "baseControlClassName": {
      "padding-and-margin:default": {
        "paddingRight": "var(--sizes-size-9)",
        "paddingLeft": "var(--sizes-size-9)"
      }
    },
    "bodyControlClassName": {
      "padding-and-margin:default": {}
    }
  },
  "regions": [
    "body",
    "header"
  ],
  "data": {},
  "onEvent": {
    "init": {
      "weight": 0,
      "actions": []
    }
  }
}
          let amisScoped = amis.embed('#root', amisJSON);
      })();
    </script>
  </body>
</html>
